/* 
 * File:   pic18f2xk22flash.h
 * Author: apleilx
 *
 * Created on 2013
 */

#ifndef PIC18F2XK22FLASH_H
#define	PIC18F2XK22FLASH_H

#ifdef	__cplusplus
extern "C" {
#endif

    extern void _FlashReadByte(unsigned long FlashAddress , unsigned char *Destination);                       //tested
    extern void _FlashReadWord(unsigned long FlashAddress , unsigned int *Destination);                        //tested
    extern void _FlashReadBytes(unsigned long FlashAddress ,unsigned char Num,unsigned char *Destination );    //tested
    extern void _FlashWriteByte(unsigned long FlashAddress,unsigned char Data );
    extern void _FlashWriteWord(unsigned long FlashAddress,unsigned int Data );
    extern void _FlashWriteBytes(unsigned long FlashAddress,unsigned char amount,unsigned char *buff);
    extern void _EraseFlash(unsigned long startaddr, unsigned long endaddr);
    extern void EEP_WriteChar( unsigned int badd,unsigned char bdat );
    extern unsigned char EEP_ReadChar( unsigned int add);
    extern void EEP_Refurbish();

#ifdef	__cplusplus
}
#endif

#endif	/* PIC18F2XK22FLASH_H */

